<?php
    
    $this->pageTitle=Yii::app()->name . ' - Add User To Project';
    $this->breadcrumbs=array(
    $model->project->nombre=>array('view','id'=>$model->project->id),'Add User');
    
    $this->menu=
            array(array('label'=>'Back To Project', 'url'=>array('view','id'=>$model->project->id)),);
?>

<h1>Add Researcher To Project <?php echo $model->project->nombre; ?></h1>
</br>
<?php if(Yii::app()->user->hasFlash('success')):?>
    <div class="successMessage">
        <?php echo Yii::app()->user->getFlash('success'); ?>
    </div>
<?php endif; ?>

<div class="form">
    <?php $form=$this->beginWidget('CActiveForm'); ?>
    <p class="note">Fields with <span class="required">*</span> are required.</p>
    
   <!-- <div class="row">
        <?php echo $form->labelEx($model,'User name'); ?>
        <?php
            $this->widget('zii.widgets.jui.CJuiAutoComplete', array(
            'name'=>'nombre',
            'source'=>$model->createUsernameList(),
            'model'=>$model,
            'attribute'=>'nombre',
            'options'=>array(
            'minLength'=>'2',
            ),
            'htmlOptions'=>array(
            'style'=>'height:20px;'
            ),
            ));
        ?>
        <?php echo $form->error($model,'nombre'); ?>
    </div>-->
    
    <div class="row">
		<?php echo $form->labelEx($model,'User name'); ?>
		<?php echo $form->dropDownList($model, 'nombre', Proyecto::getUserToProjects()); ?>
		<?php echo $form->error($model,'nombre'); ?>
    </div>
    
    </br>
    
    <div class="row buttons">
        <?php echo CHtml::submitButton('Add User'); ?>
    </div>
    
    <?php $this->endWidget(); ?>
    
</div>